target("canvas")
  set_kind("$(kind)")
  if is_kind("static") then
    add_defines("CVS_USE_STATIC")
  else
    add_defines("CVS_USE_SHARED", "CVS_EXPORT")
  end
  
  set_targetdir("../bin")
  add_includedirs("../include")
  add_files("cvs/*.cc")
target_end()

target("canvas_d2d")
  if is_kind("static") then
    add_defines("CVS_USE_STATIC")
  else
    add_defines("CVS_USE_SHARED")
  end
  set_kind("shared")
  add_defines("CVS_RENDER_EXPORT")
  
  set_targetdir("../bin")
  add_includedirs("../include", "cvs")
  add_linkdirs("../../bin")
  add_deps("canvas")
  add_links("canvas")

  add_links("ole32", "windowscodecs")

  add_files("d2d/*.cc")
target_end()